<template>
	<view class="count">
		<view class="code">
			<image :src="baseUrl+`/qrcode?content=${code}`" class="codeImg" mode=""></image>
			<view class="hexiao m-t-20">
				核销码用于核销
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				code: uni.getStorageSync('code'),
				baseUrl: this.$baseUrl
			}
		},
		onShow() {
			this.code = uni.getStorageSync('code')
		},
		methods: {
			// async init() {
			// 	let n = await this.$api.Qrcode({
			// 		content: this.code
			// 	})
			// 	console.log(n, '5555555');
			// }
		}
	}
</script>

<style lang="scss" scoped>
	.codeImg {
		margin-top: 20%;
		margin-left: 50%;
		transform: translateX(-50%);
		width: 420rpx;
		height: 420rpx;
	}

	.hexiao {
		text-align: center;
	}

	.code {
		width: 100%;
	}
</style>